<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="css/style.css" />
<title>Admin control panel !</title>
</head>

<body>
<?php include("menu.php"); ?>

<div id="head-noidung">
	<div id="head-main">
		<?php include("include/DangKy.html"); ?>
		
	<?php
	include("../include/config.php");  
	include("../include/lib.php");   // su dung class User trong lib.php
	if(isset($_REQUEST["dangky"]))
	{	$username=$_POST["username"];
		$password=md5($_POST["password"]);
		$fullname=$_POST["fullname"];
		$email=$_POST["email"];
		$tel=$_POST["tel"];
		echo "[$tel]\n";


		$u=new users(); 		/* // tao ra mot doi tuong va gan gia tri cho chung */
		$u->username=$username;  // Su dung giong nhu con tro this. Gan gia tri $username nhan dc vao username trong class User.
		$u->password=$password;
		$u->fullname=$fullname;
		$u->email=$email;
		$u->tel=$tel;

		$u->save();  // goi phuong thuc cua doi tuong	
	}
	

	?>	
	
	</div>	
</div>

<?php include("images/cherry/footer.php"); ?>

</body>
</html>
